<template>
    <div>
        hello
    </div>
</template>

<script>
export default {
  data(){
    return{}
  },
   beforeDestroy(){
        console.log('beforeDestroy'); 
     },
    destroyed(){
      console.log('destroyed');  //组件消失了
       //去除全局方法和定时器
    } 
}
</script>

<style>

</style>